find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})

set(SOURCES
    test_fib.cpp
    ${PROJECT_SOURCE_DIR}/src/Fib.cpp
)

# 添加测试可执行文件
add_executable(MyTests main.cpp ${SOURCES})

# 添加测试依赖的头文件
target_include_directories(MyTests PRIVATE ${PROJECT_SOURCE_DIR}/include)

# 链接Google Test和项目库
target_link_libraries(MyTests ${GTEST_LIBRARIES} pthread)

# 添加测试
gtest_discover_tests(MyTests)